package com.vhall.component.controller.chat;

import com.vhall.component.controller.chat.facade.CommentApiFacade;
import com.vhall.component.entity.chat.vo.CommentListReqVO;
import com.vhall.component.entity.chat.vo.CommentListRspVO;
import com.vhall.component.entity.chat.vo.CommentSubmissionVO;
import com.vhall.component.entity.page.vo.PageVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.plugin.common.annotation.VssTokenAuth;
import com.vhall.component.service.chat.CommentService;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

/**
 * @author shimingming
 * @since 2023/3/20 14:38
 */
@Slf4j
@VhallComponent
public class CommentApiController implements CommentApiFacade {

    @Resource
    CommentService commentService;

    @Override
    @VssTokenAuth
    public boolean commentSubmission(CommentSubmissionVO reqVo) {
        commentService.commentSubmission(reqVo);
        return true;
    }

    @Override
    public PageVO<CommentListRspVO> lists(CommentListReqVO reqVo) {
        return commentService.lists(reqVo);
    }
}
